package com.example.demo.service.impl;

import com.example.demo.pojo.ElectricityRate;
import com.example.demo.pojo.WaterRate;
import com.example.demo.service.RateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.demo.mapper.RateMapper;

import java.util.List;

@Service
public class RateServiceImpl implements RateService {

    @Autowired
    private RateMapper rateMapper;

    @Override
    public void updatewater(WaterRate waterRate) {
       rateMapper.updatewater(waterRate);
    }

    @Override
    public void updateelectricity(ElectricityRate electricityRate) {
        rateMapper.updateelectricity(electricityRate);
    }

    @Override
    public List<WaterRate> getwater() {
        return rateMapper.selectwater();
    }

    @Override
    public List<ElectricityRate> getelectricity() {
        return rateMapper.selectelectricity();
    }
}
